package com.freak.wanandroid.model.login.login;

import com.freak.httpmanager.callback.SubscriberCallBack;
import com.freak.wanandroid.base.repository.BaseRepository;
import com.freak.wanandroid.bean.LoginBean;
import com.freak.wanandroid.net.HttpResultFunc;

import io.reactivex.rxjava3.core.Observable;


/**
 * Created by 74099 on 2018/8/29.
 */
public class LoginRepository extends BaseRepository {
    public void doLogin(String username,String password,SubscriberCallBack<LoginBean> observer) {
        Observable observable = mApiService.doLogin(username,password).map(new HttpResultFunc<LoginBean>());
        addSubscription(observable, observer);
    }
}
